package cn.cnhis.online.mymodule;


import cn.cnhis.online.mymodule.sp.MySpUtils;

/**
 * Created by wuzhc on 2018/9/4.
 */

public class Api extends BaseApi {
    private static final String TAG = Api.class.getSimpleName();

//    public static final String URL = "http://cnhis.f3322.org:10082";
    public static final String URL = "http://h5.crm.cnhis.com";

    public static final String BASE_URL_END = "/crmappapi/";  // 生产

//    public static final String WEB_START = "/crmweb/";
    public static final String WEB_START = "/crm/";

    /*主页面地址*/
    public static final String TEST_URL_web = URL + WEB_START + "h5/#/home";
    /*忘记密码*/
    public static final String FORGETPASSWORD = URL + WEB_START + "h5/#/forgetpassword";
    /*协议地址*/
    public static final String EXPLAIN = URL + WEB_START + "h5/#/explain";

    private static RetrofitService mTest;
    private static RetrofitService mTestStr;
    private static RetrofitService mServer;
    private static RetrofitService mServerStr;


    public static RetrofitService getTestInstance() {
        if (mTest == null) {
            mTest = getRetrofitService(URL + BASE_URL_END);
        }
        return mTest;
    }

    public static RetrofitService getmServer() {
        if (mServer == null) {
            mServer = getRetrofitService(URL + BASE_URL_END);
        }
        return mServer;
    }

    public static RetrofitService getmServerStr() {
        if (mServerStr == null) {
            mServerStr = getRetrofitServiceStr(URL + BASE_URL_END);
        }
        return mServerStr;
    }

    /**
     * 重新设置
     */
    public static void resetServer() {
        mServer = getRetrofitService(URL + BASE_URL_END);
        mServerStr = getRetrofitServiceStr(URL + BASE_URL_END);
    }


}